﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace ChatGPT
{
    public class DateTemplateSelector:DataTemplateSelector
    {
        public DataTemplate SendTemplate { get; set; }
        public DataTemplate ResTemplate { get; set; }
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            Message message = (Message)item;


            if (message.IsSend)
            {
                return SendTemplate;
            }
            else
            {
                return ResTemplate;
            }
        }
    }
}
